#include "tou.h"
#include "server.h"
#include "database.h"
//create table dtTest([id] int, name text, [date] TimeStamp default (date('now')), [time] timeStamp default (time('now')));
//CREATE TABLE time([ID] INTEGER PRIMARY KEY,[IDCardNo] VARCHAR (50),[CreatedTime] TimeStamp NOT NULL DEFAULT (datetime('now','localtime')));
int main()
{
    pDB = openDatabase("user.db");

    //根据菜鸟教程上的语法编写了一句创建表格的SQL语句代码
    char * pSql = "create table user(PhoneNumber,UserName,RetrieveQuestion,QuestionAnswer,AccountNumber,Password, Time timestamp not null default (datetime('now','localtime')))";  
    if(1 == exec_sql(pDB,pSql))
    {
        printf("创建数据表成功\n");
    }

/*     char * pSqlInsert = "INSERT INTO user VALUES ('17726108746','xxw','你在干什么','你猜','2574667208','123456');";
    if(1 == exec_sql(pDB,pSqlInsert))
    {
        printf("插入数据成功\n");
    } */
/*     char * pSqlInsert = "DELETE FROM user WHERE Password='xxw215370'";
    if(1 == exec_sql(pDB,pSqlInsert))
    {
        printf("删除成功\n");
    }  */
    int epObj=createInitEpoll();
    eopllWait(epObj);
    return 0;
}